#ifndef __TIMER_INTERFACE_HPP__
#define __TIMER_INTERFACE_HPP__
#include "type_define.hpp"

const LIBVERSION  timer_libversion = MAKEVERSION(1, 0, 0, 0);

class ITimerResponse
{
public:
    virtual void OnTimer(HTIMER hTimer, void* pData) = 0;
protected:
private:
};

class ITimerManager
{
public:
    virtual HTIMER AddTimer(INT32 iElapse, INT32 iCount, void* pData=NULL) = 0;
    virtual bool ModTimer(HTIMER hTimer, INT32 iElapse, INT32 iCount, void* pData=NULL) = 0;
    virtual void DelTimer(HTIMER hTimer) = 0;
    virtual INT32 GetCount(HTIMER hTimer) = 0;
    virtual bool Update(UINT32 dwRunTime = 0) = 0;
    virtual void Release(void) = 0;
    virtual void* GetData(HTIMER hTimer) = 0;
protected:
private:
};

ITimerManager* CreateTimerManager(ITimerResponse* pTimerResponse, bool bExact = false, LIBVERSION libversion = timer_libversion);
typedef ITimerManager* (*pfn_CreateTimerManager)(ITimerResponse* pTimerResponse, bool bExact, LIBVERSION libVersion);
#endif